package aiserver

import (
	"ai/internal/db"
	"ai/internal/handlers"
	"ai/internal/logging"
)

func StartServer() {
	database := db.InitDB()

	// Pass the database to handlers if needed
	handlers.SetDB(database)

	// Setup and start the router
	r := handlers.SetupRouter(database)

	logging.Info("Server is running on 0.0.0.0:8080")
	r.Run()
}
